import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// @ts-ignore
import path from 'path'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  base:"./",
  resolve: {
    alias: {
      // @ts-ignore
      "@": path.resolve(__dirname, './src')
    },
  },
  server: {
    proxy: {
      "/xhr": {
        target: "https://m.you.163.com",
        changeOrigin: true,
      },
      "/item": {
        target: "https://m.you.163.com",
        changeOrigin: true,
      },
      "/topic": {
        target: "https://m.you.163.com",
        changeOrigin: true,
      },
    },
  },
});
